import java.awt.image.BufferedImage;

public class Langyangyang extends Sheep{
    public Langyangyang() {
        super(40,540,60,72,10,5);
    }

    @Override
    public BufferedImage getImage() {
        index++;
        if (index%25==0){
            index = 0;
            if (b==0)b=1;
            else b=0;
        }

        if (isattacking){
            if (index%40==0){
                isattacking = false;
                index = 0;
            }

            if (movedirection==TotalObject.RIGHT)return Images.langyangyang[3];
            else  return Images.langyangyang[1];
        }

        if (movedirection==TotalObject.RIGHT&&ismoving){
            if (b==0){
                return Images.langyangyang[3];
            }
            if (b==1){
                return Images.langyangyang[4];
            }
        }
        if (movedirection==TotalObject.LEFT&&ismoving){
            if (b==0){
                return Images.langyangyang[1];
            }
            if (b==1){
                return Images.langyangyang[2];
            }
        }
        if (movedirection==TotalObject.DOWN&&ismoving)return Images.langyangyang[5];
        else return Images.langyangyang[0];

    }

    public BufferedImage getportraitImage() {
        return Images.langyangyang_portrait2;
    }
}
